package com.winit.beetleAuth.web;

import com.winit.operation.BeetleOathUpdator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;


/**
 * Created by wanglin on 2018/3/23.
 */
@RestController
@RequestMapping("/api/v1/user")
public class UserController {
    private static Logger log = LoggerFactory.getLogger(UserController.class);
    @Autowired
    private BeetleOathUpdator beetleOathUpdator;

    @RequestMapping(value = "/userSync", method = RequestMethod.GET)
    @ResponseStatus(HttpStatus.OK)
    @ResponseBody
    public void getIssueNumber(){
        log.info("开始主动同步,开始时间:"+System.currentTimeMillis());
        beetleOathUpdator.execute();
    }

}
